<?php
	if(!defined("IN_APP"))
	{
		exit;
	}

	unset($wheres,$sort,$pages);
	$wheres['status'] = '2';
	$sort['addtime'] = 'desc';
	//$pages['page'] = 1;
	//$pages['rows'] = 10;
	$resData = _ChanPin::getChanPinList($wheres, array(), $sort);

	$list = $resData;

	//获取公告最后一条的时间

	$lastGong = _Gonggao::getGonggaoLastInfo();

	//判断cookie的时间与公告的最新时间

	$red = '0';

	if(!empty($lastGong))
	{
		if(!empty($_COOKIE[GONGGAO_COOKIE]))
		{
			if(intval($_COOKIE[GONGGAO_COOKIE]) < intval($lastGong['addtime']))
			{
				$red = '1';
			}
		}
		else
		{
			$red = '1';
		}
	}



	include renderTemplate('index/index');
